//package com.example.demo
//
//import com.alibaba.fastjson.serializer.SerializerFeature
//import com.alibaba.fastjson.support.config.FastJsonConfig
//import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter
//import org.springframework.boot.SpringApplication
//import org.springframework.boot.autoconfigure.SpringBootApplication
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters
//import org.springframework.http.converter.HttpMessageConverter

/**
 * Created by ${lgs} on 2018/7/23
 */
/*
@SpringBootApplication
class MainSystem {

    */
/**
     * 使用@Bean注入fastJsonHttpMessageConvert
     *//*

    fun fastJsonHttpMessageConverters(): HttpMessageConverters {

        //1、需要先定义一个convert转换消息的对象
        val fasterConverter = FastJsonHttpMessageConverter()

        //2、添加fastJson的配置信息，比如：是否要格式化返回的json数据
        val fastJsonConfig = FastJsonConfig()
        fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat)

        //3、在convert中添加配置信息
        fasterConverter.fastJsonConfig = fastJsonConfig
        val converter: HttpMessageConverter<Any> = fasterConverter


        return HttpMessageConverters(converter)
    }
}


fun main(args: Array<String>) {
//    SpringApplication.
    SpringApplication.run(MainSystem::class.java, args)
}*/
